<!--
 * @Author: Haochen
 * @Date: 2021-12-07 15:49:55
 * @LastEditTime: 2022-01-02 14:19:35
 * @FilePath: \recipes-admin-system\src\views\home\Home.vue
-->
<template>
  <div class="home">
    <el-container class="content">
      <el-header height="60px">
        <img src="../../assets/img/cook.png" alt="" />

        {{ title }}</el-header
      >

      <el-container class="outer-wrapper">
        <el-aside width="65px">
          <side-menu></side-menu>
        </el-aside>
        <el-main class="main-wrapper" style="padding: 20px">
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
// @ is an alias to /src

import SideMenu from '../../components/common/SideMenu.vue';

export default {
  data() {
    return {
      title: '菜谱管理系统',
    };
  },
  name: 'Home',
  components: {
    'side-menu': SideMenu,
  },
};
</script>

<style scoped lang="scss">
// @import '@/assets/sass/common.scss';

.home {
  width: 100vw;
  height: 100vh;
  position: relative;
}

.content {
  position: relative;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  .el-header {
    display: flex;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100vw;
    background-color: $vue-bg-color;
    color: $vue-text-color;
    font-size: 20px;
    font-weight: bold;
    text-align: left;
    // line-height: 60px;
    padding-left: 16px;
    box-shadow: $vue-box-shadow-header;
    img {
      width: 32px;
      height: 32px;
      margin-right: 20px;
    }
  }
  .outer-wrapper {
    position: absolute;
    top: 60px;
    left: 0;
    padding: 0;
    width: 100vw;
    height: calc(100vh - 60px);
    .el-aside {
      position: absolute;
      top: 0;
      left: 0;
      background-color: $vue-bg-color;
      width: $vue-aside-width;
      height: 100%;
      color: #333;
      text-align: center;
      line-height: 200px;
      box-shadow: $vue-box-shadow-side;
      z-index: 5;
    }
    .main-wrapper {
      display: flex;
      justify-content: center;
      align-items: flex-start;
      box-sizing: border-box;
      position: absolute;
      top: 0;
      right: 0;
      z-index: 3;
      width: calc(100vw - $vue-aside-width);
      height: 100%;
      background-color: #f4f7fc;
      color: #333;
      text-align: center;
      padding: 0;
    }
  }
}
</style>
